//------------------------------------------------------------------------------
//此代码由工具生成
//请使用partial类进行扩展,避免修改被覆盖
//createTime:2020-12-01 09:12:09
//------------------------------------------------------------------------------
using System.Linq.Expressions;
using System;
using System.Collections.Generic;
using System.Linq;
using XKPlatform.DataModels.Dao.BaseDao;
using XKPlatform.DataModels.Dao.BaseEntity;
using XKPlatform.DataModels;
using XKPlatform.IService;
using FreeSql;

namespace XKPlatform.Service
{
    public partial class SysLogNewService : BaseFreeSqlDao<SysLogNew>, ISysLogNewService
    {
        public bool AddModel(SysLogNew model)
        {
            return InsertAffrows(model) > 0;
        }

        public bool BatchSave(List<SysLogNew> models)
        {
            return BatchInsert(models) > 0;
        }

        public (List<SysLogNew> list, long count) GetList(Expression<Func<SysLogNew, bool>> where, List<SortInfo<SysLogNew, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, orderbys, pageInfo);
        }

        public SysLogNew GetModel(Expression<Func<SysLogNew, bool>> where)
        {
            return GetByOne(where);
        }

        public (List<SysLogNew> list, long count) GetListByTbName(Expression<Func<SysLogNew, bool>> where, string tableName, List<SortInfo<SysLogNew, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, tableName, orderbys, pageInfo);
        }

        public bool UpdateModel(SysLogNew model, Expression<Func<SysLogNew, bool>> where, Expression<Func<SysLogNew, object>> IgnoreLmbad = null)
        {
            return Update(model, where, IgnoreLmbad);
        }

        public IUpdate<SysLogNew> UpdateBySets(Expression<Func<SysLogNew, bool>> where)
        {
            throw new NotImplementedException();
        }
    }
}
